package com.zy.world

import android.content.Intent
import android.os.Bundle
import com.zy.activity.BaseMenuActivity
import com.zy.activity.bean.BaseMenuBean
import com.zy.algorithm.v3.AlgorithmV3MainMenuActivity
import com.zy.list.DIYMainActivity
import com.zy.settings.SettingsListMainActivity
import com.zy.test.widget.WidgetListMainActivity

//        Debug.waitForDebugger()
// adb shell am start -D  -n com.zy.world/.MainMenuActivity
class MainMenuActivity : BaseMenuActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun init(list: ArrayList<BaseMenuBean>) {
        list.add(BaseMenuBean("算法V3", 1))
        list.add(BaseMenuBean("UI DIY", 2))
        list.add(BaseMenuBean("设置", 3))
        list.add(BaseMenuBean("Widget", 4))
    }

    override fun clickItem(bean: BaseMenuBean) {
        when (bean.code) {
            1 -> {
                startActivity(Intent(this, AlgorithmV3MainMenuActivity::class.java))
            }
            2 -> {
                startActivity(Intent(this, DIYMainActivity::class.java))
            }
            3 -> {
                startActivity(Intent(this, SettingsListMainActivity::class.java))
            }
            4 -> {
                startActivity(Intent(this, WidgetListMainActivity::class.java))
            }
        }
    }
}